package com.ddyx.model;

/**
 * 检测人脸信息
 * 
 * @author zhongchzh
 *
 */
public class DetectFaceInfo {
	
	/** 人脸框左上角x **/
	private int x;
	
	/** 人脸框左上角y **/
	private int y;
	
	/** 人脸框宽度 **/
	private int width;
	
	/** 人脸框高度 **/
	private int height;
	
	/** 人脸置信度 **/
	private int faceProbability;
	
	/** 性别 **/
	private Integer gender;
	
	/** 年龄 **/
	private Integer age;
	
	/** 三维旋转之左右旋转角 **/
	private double yawAngle;
	
	/** 三维旋转之俯仰角度 **/
	private double pitchAngle;
	
	/** 平面内旋转角 **/
	private double rollAngle;
	
	/** 人脸模糊程度，范围[0~1] **/
	private double blur;
	
	/** 脸部光照的灰度值 取值范围[0~255] **/
	private int illumination;
	
	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public int getFaceProbability() {
		return faceProbability;
	}

	public void setFaceProbability(int faceProbability) {
		this.faceProbability = faceProbability;
	}

	public Integer getGender() {
		return gender;
	}

	public void setGender(Integer gender) {
		this.gender = gender;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public double getYawAngle() {
		return yawAngle;
	}

	public void setYawAngle(double yawAngle) {
		this.yawAngle = yawAngle;
	}

	public double getPitchAngle() {
		return pitchAngle;
	}

	public void setPitchAngle(double pitchAngle) {
		this.pitchAngle = pitchAngle;
	}

	public double getRollAngle() {
		return rollAngle;
	}

	public void setRollAngle(double rollAngle) {
		this.rollAngle = rollAngle;
	}

	public double getBlur() {
		return blur;
	}

	public void setBlur(double blur) {
		this.blur = blur;
	}

	public int getIllumination() {
		return illumination;
	}

	public void setIllumination(int illumination) {
		this.illumination = illumination;
	}
	
	public boolean isValid() {
		
		if(this.height <=0 || this.width <=0) {
			return false;
		}
		
		return true;
	}

	@Override
	public String toString() {
		return "DetectFaceInfo [x=" + x + ", y=" + y + ", width=" + width + ", height=" + height + ", faceProbability="
				+ faceProbability + ", gender=" + gender + ", age=" + age + ", yawAngle=" + yawAngle + ", pitchAngle="
				+ pitchAngle + ", rollAngle=" + rollAngle + ", blur=" + blur + ", illumination=" + illumination + "]";
	}
}
